Skip to content

Commit

Permalink
add typings and import extensions for module support
Browse files Browse the repository at this point in the history
  • Loading branch information
brianzinn committed Oct 26, 2021
1 parent d03b99d commit bc99dd4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions storybook/stories/babylonjs/Basic/gizmoManager.stories.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useRef, useState } from 'react';
import React, { useEffect, useState } from 'react';
import { Engine, Scene, useScene } from 'react-babylonjs';
import { Color3 } from '@babylonjs/core/Maths/math.color';
import { Vector3 } from '@babylonjs/core/Maths/math.vector';
Expand Down Expand Up @@ -29,14 +29,13 @@ const GizmoManager = () => {
/>
<hemisphericLight name='hemi' direction={new Vector3(0, -1, 0)} intensity={0.8} />
<Inspector />
<directionalLight name='red-light' direction={new Vector3(-5 * Math.PI / 4, -5 * Math.PI / 4, -Math.PI)} intensity={8} angle={102} exponent={5}
<directionalLight name='red-light' direction={new Vector3(-5 * Math.PI / 4, -5 * Math.PI / 4, -Math.PI)} intensity={8}
diffuse={Color3.Red()}
specular={Color3.Red()}
position={new Vector3(0, 5, 0)}
ref={setLightRef}
>
<shadowGenerator mapSize={1024} useBlurExponentialShadowMap blurKernel={32} shadowCastChildren>
<icoSphere name='ico1' position={new Vector3(0, 2, 0)} diffuseColor={Color3.Red()} />
<icoSphere name='ico1' position={new Vector3(0, 2, 0)} />
</shadowGenerator>
</directionalLight>

Expand Down
8 changes: 4 additions & 4 deletions storybook/stories/babylonjs/Basic/portal.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ function WithCreatePortal() {
return (
<>
{(transformNodeRef.current) &&
createPortal(<box position={new Vector3(0, 1, 0)}>
<standardMaterial diffuseColor={Color3.Blue() } specularColor={Color3.Black()} />
</box>, transformNodeRef.current)
}
createPortal(<box position={new Vector3(0, 1, 0)}>
<standardMaterial diffuseColor={Color3.Blue() } specularColor={Color3.Black()} />
</box>, transformNodeRef.current['__rb_createdInstance'])
}
<transformNode name="transform-node" ref={transformNodeRef}>
<ground name='ground1' width={6} height={6} subdivisions={2} position={new Vector3(0, 0, 0)} />
</transformNode>
Expand Down

0 comments on commit bc99dd4

Please sign in to comment.