Replies: 3 comments 7 replies
-
the ball.gltf is a standard sphere |
Beta Was this translation helpful? Give feedback.
0 replies
-
I you just want to change texture for a material you can do it like this also: let ball = PIXI3D.Model.from(ResLoader.resources['image_3d/ball.gltf'].gltf)
ball.meshes[0].material.normalTexture = PIXI.Texture.from('image_3d/ball.png'); |
Beta Was this translation helpful? Give feedback.
6 replies
-
I have added support for orthographic camera, check develop branch. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
[code]
let light = Object.assign(new PIXI3D.Light, { type: PIXI3D.LightType.directional, x: 0, y: 0, z: 1 });
PIXI3D.LightingEnvironment.main.lights.push(light);
let ball = PIXI3D.Model.from(ResLoader.resources['image_3d/ball.gltf'].gltf,
{
create: function (source: any): any
{
let material = new PIXI3D.StandardMaterial();
material.normalTexture = PIXI.Texture.from('image_3d/ball.png');
return material;
}
});
but the result don't contains any color.
the raw texture file, as below:
Beta Was this translation helpful? Give feedback.
All reactions