About using thressj with zim

Hello. I'm trying to use ZIM and threejs these days.
I'm looking at the examples. Which one would be the right one to use? Can you explain the differences between them?

import ZIM from "https://zimjs.org/cdn/015/zim_three"; // includes three.js R155

or
import * as THREE from "https://zimjs.org/cdn/r155/three.module.js";
import {OrbitControls} from "https://zimjs.org/cdn/r155/OrbitControls_module.js";
import ZIM from "https://zimjs.org/cdn/015/zim";

is there a difference?

Also, I think Threex.FullScreen is needed for the second use.

My other questions:
Can we use the model we made with Blender with ZIM and threejs?
Also, can you make a few tutorials starting from very simple?

We just did a few ZIM with three.js videos not too long ago. They should be good. They are listed on the ZIM Three page - I am guessing that you want to scroll down to three.js inside of ZIM section.

image

Just use

import zim from "https://zimjs.org/017/zim_three";

It comes with our latest versions of things and these - these are all quite small.

  • OrbitControls
  • FirstPersonCon{trols
  • PointerLockControls
  • VRButton
  • ObjectControls
  • GLTFLoader

You should be able to bring in Blender models without problem. Save them as GLTF files - raw or binary.

1 Like

Thank you very much

1 Like

Let us know how it goes and if you have any questions. All the best.

I'm just trying to figure it out. I think the way to communicate between ZIM and threejs is textureActives. I think this is the main point. For example, when I want to rotate a threejs object when a ZIM button is clicked, I just learned that I need to add the ZIM button with textureActives.

What I want to do is to create threejs interactions using ZIM buttons or components.