# Flat AR Expansion Capabilities

# Method Definition

6DoF - Multiple extensions of the capabilities of planar AR capabilities, different capabilities can be combined.

  1. Marker recognition ability, that is, the recognition of multiple different recognition targets in plane space.
  2. ``The ability of virtual and real occlusion, that is, the interactive occlusion of virtual objects and the real world.

It needs to be opened for use on aV2plane basis.

# Marker recognition ability

Enabled by configuring themarkerfield in VKSession.Then, consistent with the use process of the common marker, we add different recognition targets to identify throughsession.addMarker.Example code:

const session = wx.createVKSession({
  track: {
    plane: {
        mode: 1
    },
    marker: true,
  },
  version: 'v2'
})

// . .. initial session related process

// Add marker targets dynamically, using the same flow as normal markers
session.addMarker(filePath)

In this mode, after the marker is identified, it is placed in the world space of the plane recognition. Allows multiple different identification targets to be identified at the same time. In the current version, the pattern works for static objects, and the recognition of objects is updated relatively slowly.Every3s,No apparent movement updates the position and retests every7s.

# False blocking Initialization is turned on, and does not support multi-extension mixed use

Enabled by configuring the depth field in VKSession, sample code:

const session = wx.createVKSession({
  track: {
    depth: { mode: 1 }
  },
  version: 'v2'
})

# Transparent blocking dynamically turns on and off, supporting multi-extension mixed use

let depthOpenFlag = true; 
session.setDepthSwitch(depthOpenFlag) // 更改深度开启状态

// After the depth is on, you can get the degree buffer via VKFrame
const frame = session.getVKFrame(this.canvas.width, this.canvas.height)
const depthBufferRes = frame.getDepthBuffer();
// Weixin Mini Program

# Example of application scenarios

Multi-marker recognition in planar mode

plane+marker

# Program Examples

For the above example, you can view the sample code on the Horizontal + Horizontal + Additional Capabilities Example page.