好像!
这里categoryBitMask被忽略:
ambientLight = [SCNLight light];
ambientLight.color = [UIColor colorWithRed:0.994 green:0.715 blue:0.179 alpha:1.000];
ambientLight.type = SCNLightTypeAmbient;
ambientLight.categoryBitMask = 1;
Run Code Online (Sandbox Code Playgroud)
在这里工作!
ambientLight = [SCNLight light];
ambientLight.color = [UIColor colorWithRed:0.994 green:0.715 blue:0.179 alpha:1.000];
ambientLight.type = SCNLightTypeOmni;
ambientLight.categoryBitMask = 1;
Run Code Online (Sandbox Code Playgroud) 我想以编程方式更改使用iOS中的SceneKit渲染的对象的材质。但是我想使用动画图像文件。PNG序列在iOS中可以很好地用于UIImageViews之类的东西-如何将它们用作SceneKit中的材料?
这样的事情不工作:
floor.firstMaterial.diffuse.contents = [UIImage animatedImageNamed:@"ANIMATION_" duration:6.0f];
Run Code Online (Sandbox Code Playgroud)
谢谢!